import vec

WIDTH = 250
HEIGHT = 250

BACK_COLOR = (0, 0, 127)
CIRCLE_COLOR = (0, 200, 0)

class MyCircle:
    def __init__(self, x, y, r, dir_x, dir_y):
        self.pos = vec.Vec2(x, y)
        self.r = r
        self.dir = vec.Vec2(dir_x, dir_y)
        self.dir.normalize()
        self.spd = 1

    def SetSpeed(self, spd):
        self.spd = spd

    def Update(self):
        self.pos = self.pos + self.dir * self.spd

    def Draw(self):
        screen.draw.filled_circle((self.pos.x, self.pos.y), self.r, CIRCLE_COLOR)

def on_key_down(key):
    if key == keys.ESCAPE:
        quit() 
        
def on_mouse_down(pos):
    print("mouse_down", pos)
    
def on_mouse_up(pos):
    print("mouse_up", pos)

c = MyCircle(50, 50, 30, 3, 1)

def update():
    c.Update()

def draw():
    screen.fill(BACK_COLOR)
    c.Draw()
